Integrand size = 14, antiderivative size = 185 \[ \int (c+d x)^3 \csc (a+b x) \, dx=-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {3 i d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {6 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {6 i d^3 \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^4}+\frac {6 i d^3 \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^4} \]
-2*(d*x+c)^3*arctanh(exp(I*(b*x+a)))/b+3*I*d*(d*x+c)^2*polylog(2,-exp(I*(b *x+a)))/b^2-3*I*d*(d*x+c)^2*polylog(2,exp(I*(b*x+a)))/b^2-6*d^2*(d*x+c)*po lylog(3,-exp(I*(b*x+a)))/b^3+6*d^2*(d*x+c)*polylog(3,exp(I*(b*x+a)))/b^3-6 *I*d^3*polylog(4,-exp(I*(b*x+a)))/b^4+6*I*d^3*polylog(4,exp(I*(b*x+a)))/b^ 4
Time = 0.30 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.19 \[ \int (c+d x)^3 \csc (a+b x) \, dx=\frac {-2 b^3 (c+d x)^3 \text {arctanh}(\cos (a+b x)+i \sin (a+b x))+3 i d \left (b^2 (c+d x)^2 \operatorname {PolyLog}(2,-\cos (a+b x)-i \sin (a+b x))+2 i b d (c+d x) \operatorname {PolyLog}(3,-\cos (a+b x)-i \sin (a+b x))-2 d^2 \operatorname {PolyLog}(4,-\cos (a+b x)-i \sin (a+b x))\right )-3 i d \left (b^2 (c+d x)^2 \operatorname {PolyLog}(2,\cos (a+b x)+i \sin (a+b x))+2 i b d (c+d x) \operatorname {PolyLog}(3,\cos (a+b x)+i \sin (a+b x))-2 d^2 \operatorname {PolyLog}(4,\cos (a+b x)+i \sin (a+b x))\right )}{b^4} \]
(-2*b^3*(c + d*x)^3*ArcTanh[Cos[a + b*x] + I*Sin[a + b*x]] + (3*I)*d*(b^2* (c + d*x)^2*PolyLog[2, -Cos[a + b*x] - I*Sin[a + b*x]] + (2*I)*b*d*(c + d* x)*PolyLog[3, -Cos[a + b*x] - I*Sin[a + b*x]] - 2*d^2*PolyLog[4, -Cos[a + b*x] - I*Sin[a + b*x]]) - (3*I)*d*(b^2*(c + d*x)^2*PolyLog[2, Cos[a + b*x] + I*Sin[a + b*x]] + (2*I)*b*d*(c + d*x)*PolyLog[3, Cos[a + b*x] + I*Sin[a + b*x]] - 2*d^2*PolyLog[4, Cos[a + b*x] + I*Sin[a + b*x]]))/b^4
Time = 0.67 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.10, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4671, 3011, 7163, 2720, 7143}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (c+d x)^3 \csc (a+b x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^3 \csc (a+b x)dx\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle -\frac {3 d \int (c+d x)^2 \log \left (1-e^{i (a+b x)}\right )dx}{b}+\frac {3 d \int (c+d x)^2 \log \left (1+e^{i (a+b x)}\right )dx}{b}-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {2 i d \int (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )dx}{b}\right )}{b}-\frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {2 i d \int (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )dx}{b}\right )}{b}-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 7163 |
\(\displaystyle \frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {2 i d \left (\frac {i d \int \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )dx}{b}-\frac {i (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {2 i d \left (\frac {i d \int \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )dx}{b}-\frac {i (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {2 i d \left (\frac {d \int e^{-i (a+b x)} \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {2 i d \left (\frac {d \int e^{-i (a+b x)} \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle -\frac {2 (c+d x)^3 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {2 i d \left (\frac {d \operatorname {PolyLog}\left (4,-e^{i (a+b x)}\right )}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}-\frac {3 d \left (\frac {i (c+d x)^2 \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {2 i d \left (\frac {d \operatorname {PolyLog}\left (4,e^{i (a+b x)}\right )}{b^2}-\frac {i (c+d x) \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b}\right )}{b}\right )}{b}\) |
(-2*(c + d*x)^3*ArcTanh[E^(I*(a + b*x))])/b + (3*d*((I*(c + d*x)^2*PolyLog [2, -E^(I*(a + b*x))])/b - ((2*I)*d*(((-I)*(c + d*x)*PolyLog[3, -E^(I*(a + b*x))])/b + (d*PolyLog[4, -E^(I*(a + b*x))])/b^2))/b))/b - (3*d*((I*(c + d*x)^2*PolyLog[2, E^(I*(a + b*x))])/b - ((2*I)*d*(((-I)*(c + d*x)*PolyLog[ 3, E^(I*(a + b*x))])/b + (d*PolyLog[4, E^(I*(a + b*x))])/b^2))/b))/b
3.1.23.3.1 Defintions of rubi rules used
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[- 2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*x))]/f), x] + (-Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x )^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IG tQ[m, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. )*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a + b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F])) Int[(e + f*x) ^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c , d, e, f, n, p}, x] && GtQ[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 632 vs. \(2 (167 ) = 334\).
Time = 0.28 (sec) , antiderivative size = 633, normalized size of antiderivative = 3.42
method | result | size |
risch | \(\frac {6 i c \,d^{2} \operatorname {Li}_{2}\left (-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {6 i c \,d^{2} \operatorname {Li}_{2}\left ({\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {6 i d^{3} \operatorname {Li}_{4}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}+\frac {2 d^{3} a^{3} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {6 c \,d^{2} \operatorname {Li}_{3}\left (-{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 c \,d^{2} \operatorname {Li}_{3}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{3}}{b}+\frac {d^{3} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{3}}{b}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a^{3}}{b^{4}}+\frac {d^{3} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{3}}{b^{4}}-\frac {6 d^{3} \operatorname {Li}_{3}\left (-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}+\frac {6 d^{3} \operatorname {Li}_{3}\left ({\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{3}}-\frac {6 i d^{3} \operatorname {Li}_{4}\left (-{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{4}}-\frac {3 i c^{2} d \,\operatorname {Li}_{2}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {3 i c^{2} d \,\operatorname {Li}_{2}\left (-{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {6 c \,d^{2} a^{2} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {6 c^{2} d a \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {3 c^{2} d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}+\frac {3 c^{2} d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {3 c \,d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b}+\frac {3 c \,d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}-\frac {3 c^{2} d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}+\frac {3 c^{2} d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {3 c \,d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a^{2}}{b^{3}}-\frac {3 c \,d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{2}}{b^{3}}+\frac {3 i d^{3} \operatorname {Li}_{2}\left (-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b^{2}}-\frac {3 i d^{3} \operatorname {Li}_{2}\left ({\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b^{2}}-\frac {2 c^{3} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}\) | \(633\) |
6*I*d^3*polylog(4,exp(I*(b*x+a)))/b^4-2/b*c^3*arctanh(exp(I*(b*x+a)))+2/b^ 4*d^3*a^3*arctanh(exp(I*(b*x+a)))-6/b^3*c*d^2*polylog(3,-exp(I*(b*x+a)))+6 /b^3*c*d^2*polylog(3,exp(I*(b*x+a)))-1/b*d^3*ln(exp(I*(b*x+a))+1)*x^3+1/b* d^3*ln(1-exp(I*(b*x+a)))*x^3-1/b^4*d^3*ln(exp(I*(b*x+a))+1)*a^3+1/b^4*d^3* ln(1-exp(I*(b*x+a)))*a^3-6/b^3*d^3*polylog(3,-exp(I*(b*x+a)))*x+6/b^3*d^3* polylog(3,exp(I*(b*x+a)))*x+6*I/b^2*c*d^2*polylog(2,-exp(I*(b*x+a)))*x-6*I /b^2*c*d^2*polylog(2,exp(I*(b*x+a)))*x-3*I/b^2*c^2*d*polylog(2,exp(I*(b*x+ a)))+3*I/b^2*c^2*d*polylog(2,-exp(I*(b*x+a)))-6/b^3*c*d^2*a^2*arctanh(exp( I*(b*x+a)))+6/b^2*c^2*d*a*arctanh(exp(I*(b*x+a)))-3/b*c^2*d*ln(exp(I*(b*x+ a))+1)*x+3/b*c^2*d*ln(1-exp(I*(b*x+a)))*x-3/b*c*d^2*ln(exp(I*(b*x+a))+1)*x ^2+3/b*c*d^2*ln(1-exp(I*(b*x+a)))*x^2-3/b^2*c^2*d*ln(exp(I*(b*x+a))+1)*a+3 /b^2*c^2*d*ln(1-exp(I*(b*x+a)))*a+3/b^3*c*d^2*ln(exp(I*(b*x+a))+1)*a^2-3/b ^3*c*d^2*ln(1-exp(I*(b*x+a)))*a^2+3*I/b^2*d^3*polylog(2,-exp(I*(b*x+a)))*x ^2-3*I/b^2*d^3*polylog(2,exp(I*(b*x+a)))*x^2-6*I*d^3*polylog(4,-exp(I*(b*x +a)))/b^4
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 820 vs. \(2 (161) = 322\).
Time = 0.36 (sec) , antiderivative size = 820, normalized size of antiderivative = 4.43 \[ \int (c+d x)^3 \csc (a+b x) \, dx=\frac {6 i \, d^{3} {\rm polylog}\left (4, \cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 6 i \, d^{3} {\rm polylog}\left (4, \cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + 6 i \, d^{3} {\rm polylog}\left (4, -\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 6 i \, d^{3} {\rm polylog}\left (4, -\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (i \, b^{2} d^{3} x^{2} + 2 i \, b^{2} c d^{2} x + i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (-i \, b^{2} d^{3} x^{2} - 2 i \, b^{2} c d^{2} x - i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (i \, b^{2} d^{3} x^{2} + 2 i \, b^{2} c d^{2} x + i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 3 \, {\left (-i \, b^{2} d^{3} x^{2} - 2 i \, b^{2} c d^{2} x - i \, b^{2} c^{2} d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + b^{3} c^{3}\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b^{3} d^{3} x^{3} + 3 \, b^{3} c d^{2} x^{2} + 3 \, b^{3} c^{2} d x + 3 \, a b^{2} c^{2} d - 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, \cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, \cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) - 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, -\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) - 6 \, {\left (b d^{3} x + b c d^{2}\right )} {\rm polylog}\left (3, -\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right )}{2 \, b^{4}} \]
1/2*(6*I*d^3*polylog(4, cos(b*x + a) + I*sin(b*x + a)) - 6*I*d^3*polylog(4 , cos(b*x + a) - I*sin(b*x + a)) + 6*I*d^3*polylog(4, -cos(b*x + a) + I*si n(b*x + a)) - 6*I*d^3*polylog(4, -cos(b*x + a) - I*sin(b*x + a)) - 3*(I*b^ 2*d^3*x^2 + 2*I*b^2*c*d^2*x + I*b^2*c^2*d)*dilog(cos(b*x + a) + I*sin(b*x + a)) - 3*(-I*b^2*d^3*x^2 - 2*I*b^2*c*d^2*x - I*b^2*c^2*d)*dilog(cos(b*x + a) - I*sin(b*x + a)) - 3*(I*b^2*d^3*x^2 + 2*I*b^2*c*d^2*x + I*b^2*c^2*d)* dilog(-cos(b*x + a) + I*sin(b*x + a)) - 3*(-I*b^2*d^3*x^2 - 2*I*b^2*c*d^2* x - I*b^2*c^2*d)*dilog(-cos(b*x + a) - I*sin(b*x + a)) - (b^3*d^3*x^3 + 3* b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + b^3*c^3)*log(cos(b*x + a) + I*sin(b*x + a) + 1) - (b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + b^3*c^3)*log(cos( b*x + a) - I*sin(b*x + a) + 1) + (b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) + (b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3)*log(-1/2*cos(b*x + a) - 1/2*I*sin (b*x + a) + 1/2) + (b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + 3*a*b^ 2*c^2*d - 3*a^2*b*c*d^2 + a^3*d^3)*log(-cos(b*x + a) + I*sin(b*x + a) + 1) + (b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + 3*a*b^2*c^2*d - 3*a^2* b*c*d^2 + a^3*d^3)*log(-cos(b*x + a) - I*sin(b*x + a) + 1) + 6*(b*d^3*x + b*c*d^2)*polylog(3, cos(b*x + a) + I*sin(b*x + a)) + 6*(b*d^3*x + b*c*d^2) *polylog(3, cos(b*x + a) - I*sin(b*x + a)) - 6*(b*d^3*x + b*c*d^2)*polylog (3, -cos(b*x + a) + I*sin(b*x + a)) - 6*(b*d^3*x + b*c*d^2)*polylog(3, ...
Timed out. \[ \int (c+d x)^3 \csc (a+b x) \, dx=\text {Timed out} \]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 716 vs. \(2 (161) = 322\).
Time = 0.29 (sec) , antiderivative size = 716, normalized size of antiderivative = 3.87 \[ \int (c+d x)^3 \csc (a+b x) \, dx=-\frac {2 \, c^{3} \log \left (\cot \left (b x + a\right ) + \csc \left (b x + a\right )\right ) - \frac {6 \, a c^{2} d \log \left (\cot \left (b x + a\right ) + \csc \left (b x + a\right )\right )}{b} + \frac {6 \, a^{2} c d^{2} \log \left (\cot \left (b x + a\right ) + \csc \left (b x + a\right )\right )}{b^{2}} - \frac {2 \, a^{3} d^{3} \log \left (\cot \left (b x + a\right ) + \csc \left (b x + a\right )\right )}{b^{3}} + \frac {12 i \, d^{3} {\rm Li}_{4}(-e^{\left (i \, b x + i \, a\right )}) - 12 i \, d^{3} {\rm Li}_{4}(e^{\left (i \, b x + i \, a\right )}) - 2 \, {\left (-i \, {\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (-i \, b c d^{2} + i \, a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (-i \, b^{2} c^{2} d + 2 i \, a b c d^{2} - i \, a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 \, {\left (-i \, {\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (-i \, b c d^{2} + i \, a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (-i \, b^{2} c^{2} d + 2 i \, a b c d^{2} - i \, a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 6 \, {\left (i \, b^{2} c^{2} d - 2 i \, a b c d^{2} + i \, {\left (b x + a\right )}^{2} d^{3} + i \, a^{2} d^{3} + 2 \, {\left (i \, b c d^{2} - i \, a d^{3}\right )} {\left (b x + a\right )}\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) - 6 \, {\left (-i \, b^{2} c^{2} d + 2 i \, a b c d^{2} - i \, {\left (b x + a\right )}^{2} d^{3} - i \, a^{2} d^{3} + 2 \, {\left (-i \, b c d^{2} + i \, a d^{3}\right )} {\left (b x + a\right )}\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left ({\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (b c d^{2} - a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) - {\left ({\left (b x + a\right )}^{3} d^{3} + 3 \, {\left (b c d^{2} - a d^{3}\right )} {\left (b x + a\right )}^{2} + 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2} + a^{2} d^{3}\right )} {\left (b x + a\right )}\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) + 12 \, {\left (b c d^{2} + {\left (b x + a\right )} d^{3} - a d^{3}\right )} {\rm Li}_{3}(-e^{\left (i \, b x + i \, a\right )}) - 12 \, {\left (b c d^{2} + {\left (b x + a\right )} d^{3} - a d^{3}\right )} {\rm Li}_{3}(e^{\left (i \, b x + i \, a\right )})}{b^{3}}}{2 \, b} \]
-1/2*(2*c^3*log(cot(b*x + a) + csc(b*x + a)) - 6*a*c^2*d*log(cot(b*x + a) + csc(b*x + a))/b + 6*a^2*c*d^2*log(cot(b*x + a) + csc(b*x + a))/b^2 - 2*a ^3*d^3*log(cot(b*x + a) + csc(b*x + a))/b^3 + (12*I*d^3*polylog(4, -e^(I*b *x + I*a)) - 12*I*d^3*polylog(4, e^(I*b*x + I*a)) - 2*(-I*(b*x + a)^3*d^3 + 3*(-I*b*c*d^2 + I*a*d^3)*(b*x + a)^2 + 3*(-I*b^2*c^2*d + 2*I*a*b*c*d^2 - I*a^2*d^3)*(b*x + a))*arctan2(sin(b*x + a), cos(b*x + a) + 1) - 2*(-I*(b* x + a)^3*d^3 + 3*(-I*b*c*d^2 + I*a*d^3)*(b*x + a)^2 + 3*(-I*b^2*c^2*d + 2* I*a*b*c*d^2 - I*a^2*d^3)*(b*x + a))*arctan2(sin(b*x + a), -cos(b*x + a) + 1) - 6*(I*b^2*c^2*d - 2*I*a*b*c*d^2 + I*(b*x + a)^2*d^3 + I*a^2*d^3 + 2*(I *b*c*d^2 - I*a*d^3)*(b*x + a))*dilog(-e^(I*b*x + I*a)) - 6*(-I*b^2*c^2*d + 2*I*a*b*c*d^2 - I*(b*x + a)^2*d^3 - I*a^2*d^3 + 2*(-I*b*c*d^2 + I*a*d^3)* (b*x + a))*dilog(e^(I*b*x + I*a)) + ((b*x + a)^3*d^3 + 3*(b*c*d^2 - a*d^3) *(b*x + a)^2 + 3*(b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*(b*x + a))*log(cos(b* x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) - ((b*x + a)^3*d^3 + 3*(b* c*d^2 - a*d^3)*(b*x + a)^2 + 3*(b^2*c^2*d - 2*a*b*c*d^2 + a^2*d^3)*(b*x + a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) + 12*(b*c*d^ 2 + (b*x + a)*d^3 - a*d^3)*polylog(3, -e^(I*b*x + I*a)) - 12*(b*c*d^2 + (b *x + a)*d^3 - a*d^3)*polylog(3, e^(I*b*x + I*a)))/b^3)/b
\[ \int (c+d x)^3 \csc (a+b x) \, dx=\int { {\left (d x + c\right )}^{3} \csc \left (b x + a\right ) \,d x } \]
Timed out. \[ \int (c+d x)^3 \csc (a+b x) \, dx=\int \frac {{\left (c+d\,x\right )}^3}{\sin \left (a+b\,x\right )} \,d x \]